<?php

namespace App\Http\Controllers\Seller;

use App\Http\Controllers\Controller;
use App\Services\IntegralRatioService;
use Illuminate\Http\Request;

/**
 * Class IntegralRatio
 * @package App\Http\Controllers\Seller
 */
class IntegralRatio extends Controller
{
    /**
     * IntegralRatio constructor.
     */
    public $IntegralService;

    public function __construct()
    {
        $this->IntegralService = new IntegralRatioService();
    }


    /**
     * 2021/3/14--16:36
     * @author:董宗澳
     * @email:2453611300
     * @wechat:DZA74941
     * @QQ:2453611300
     * @web:www.quzha.net
     * @method:index
     * @effect:获取积分抵扣列表
     */
    public function index()
    {
        try {
            return $this->IntegralService->getList();
        } catch (\Exception $e) {
            return $this->error('获取失败:' . $e->getMessage());
        }
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param \Illuminate\Http\Request $request
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param int $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }

    public function __destruct()
    {
        $this->IntegralService;
        // TODO: Implement __destruct() method.
    }
}
